package cc.yugu.yhdw.webserver.persistence.hdw;

import cc.yugu.yhdw.common.domain.hdw.ExchangeOrder;
import cc.yugu.yhdw.common.persistence.MasterMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 换点订单信息
 *
 * @Date:Created in 2018/6/30 15:13
 * @Author:
 * @Modified By: zjn 2018/6/30 15:13
 */
public interface ExchangeOrderMapper extends MasterMapper {
    /**
     * 根据主键查询表 hdw_exchange_order
     *
     * @Param: [id]
     * @Return: cc.yugu.yhdw.common.domain.hdw.ExchangeOrder
     * @Author By: zjn 2018/6/30  15:13
     */
    public ExchangeOrder find(String id);

    /**
     * 查询，返回行数
     *
     * @Param: [search]
     * @Return: int
     * @Author By: zjn 2018/6/30  15:29
     */
    public int findPageCount(ExchangeOrder search);

    /**
     * 根据主键查询
     *
     * @Param: [id, orderStatus, secondBoxNum, openSecondBoxTime, secondBatteryId]
     * @Return: int
     * @Author By: zjn 2018/6/30  15:29
     */
    public int takeSecondBattery(@Param("id") String id, @Param("orderStatus") int orderStatus, @Param("secondBoxNum") String secondBoxNum, @Param("openSecondBoxTime") Date openSecondBoxTime, @Param("secondBatteryId") String secondBatteryId);

    /**
     * 分页查询，并将查询结果按照主键降序排列
     *
     * @Param: [search]
     * @Return: java.util.List<cc.yugu.yhdw.common.domain.hdw.ExchangeOrder>
     * @Author By: zjn 2018/6/30  15:29
     */
    public List<ExchangeOrder> findPageResult(ExchangeOrder search);

    /**
     * 查询，去掉重复的创建时间
     *
     * @Param: []
     * @Return: java.util.List<java.lang.String>
     * @Author By: zjn 2018/6/30  15:29
     */
    public List<String> findYeah();

    /**
     * 去重复查询
     *
     * @Param: []
     * @Return: java.util.List<java.util.Map   <   java.lang.String   ,   java.lang.String>>
     * @Author By: zjn 2018/6/30  15:34
     */
    public List<Map<String, String>> findMonth();

    /**
     * 根据属性查询订单列表
     *
     * @Param
     * @Return
     * @Author zxj 2018/7/24
     */
    public List<String> findOrderIds(ExchangeOrder exchangeOrder);

}
